<template>
  <div>
    <h1>事件修饰符</h1>
    <!-- .prevent 阻止默认行为 -->
    <a href="http://www.baidu.com" @click.prevent="clickFn">百度</a>
    <div @click=" fatherClick">
      <!--.stop阻止冒泡  -->
      <button @click.stop=" sonClick">son</button>
    </div>

  </div>
</template>

<script>
export default {
  methods: {
    clickFn() {
    console.log('我点击了a');

    },
    fatherClick() {
      console.log('fatherClick触发了');
    },
     sonClick() {
      console.log('sonClick触发了');
    }
     }
}
</script>

<style></style>
